// components/startNumber/startNumber.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {

    },

    /**
     * 组件的初始数据
     */
    data: {
        animationData: null,
        num: 3
    },

    attached: function() {
        // this.animation = wx.createAnimation({
        //     duration: 1000,
        //     timingFunction: '"ease"',
        //     delay: 0,
        //     transformOrigin: '"50% 50%"'
        // })
        // this.animation.scale(5).step()
        // this.setData({ animationData: this.animation.export() })
    },
    ready: function() {
        let timer = setInterval(() => {
            if (this.data.num == 1) {
                this.triggerEvent('endStartNumberevent', 'end')
                clearInterval(timer)
                timer = null
            } else {
                this.setData({ num: this.data.num - 1 })
            }
        }, 1000)
    },

    /**
     * 组件的方法列表
     */
    methods: {

    }
})
